import 'package:flutter/material.dart';

class AppBarDemoPage extends StatelessWidget {
  const AppBarDemoPage({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        centerTitle: true,
        title: Text("顶部导航顶"),
        backgroundColor: Colors.purple,
        // leading: IconButton(
        //   icon: Icon(Icons.menu),
        //   onPressed: () {
        //     print("object");
        //   },
        // ),
        actions: <Widget>[
          IconButton(
            icon: Icon(Icons.menu),
            onPressed: () {
              print("object");
            },
          ),
          IconButton(
            icon: Icon(Icons.menu),
            onPressed: () {
              print("object");
            },
          )
        ],
      ),
      body: Container(
        child: Text("你好，flutter"),
      ),
    );
  }
}